const BASE_URL="http://localhost:8082"
uni.showLoading({
	title: '加载中',
	mask: false
});
const request=(options)=>{
	return new Promise((resolve,reject)=>{
		uni.request({
			url: BASE_URL+options.url,
			method: options.methods||'GET',
			data: options.data||{},
			success: res => {
				resolve(res)
				uni.hideLoading()
			},
			fail: (err) => {
				reject(err)
			},
			complete: () => {}
		});
	})
}

export {request}